<?php

class Core_Frontend_Module_Concessions_Conlist extends Dcmp_Module_Base {

    
    protected $name = 'concessions_conlist';
    public function install() {

    }

    public function uninstall() {

    }

    public function buildConfig($form) {
        $categories = App::getModel('article/collection_category')->load();
        $form->addTextBoxField($this->__f('share.label.dynamic','{article.label.page_index}'), 'dy_page_index', 'module[parameters][dynamic][page_index]');
        $form->addTextBoxField($this->__('article.label.concessions_category'), 'category_id', 'module[parameters][dynamic][category_id]');
        $form->createTab('module_option', $this->__('design.label.dynamic_parameter'),
                array('field_dy_page_index','field_category_id'));
    }

    public function render() {
        $args = $this->getRequest()->getAllParameters();
        $args = array_merge($args, array('page' => '{index}'));
        $urlFormat = $this->getUrl($args, 'conlist', 'content', 'concessions');
        $tmpl = $this->getTemplate()->assignMulti(array('concessions' => $this->getVariables()->getConcessionsList(),'pagination'=>$this->getVariables()->getConcessionsListPagination()));
        return $tmpl->render($this->getTemplatePath());
    }

}